﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using Pocahontas.Mvc;
using Pocahontas.Sitecore.Mvc;
using System.Text.RegularExpressions;
using ScapiSafeDictionary = global::Sitecore.Collections.SafeDictionary<string>;

namespace Pocahontas.Sitecore.Mvc.Tests
{
	[TestFixture]
	public class SitecoreFieldAttributeDictionaryExtensionsTests
	{
		[Test]
		public void TestToSafeDictionary()
		{
			// Arrange
			IDictionary<string, object> htmlAttributes = new Dictionary<string, object>();

			htmlAttributes["href"] = "#test";

			// Act
			ScapiSafeDictionary dictionary = SitecoreFieldAttributeDictionary.FromAttributes(htmlAttributes)
				.ToSafeDictionary();

			// Assert
			Assert.AreEqual("#test", dictionary["href"]);
		}
	}
}
